package com.github.cosycode.flow.base;

import com.github.cosycode.common.util.otr.PrintTool;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * <b>Description : </b>
 * <p>
 * <b>created in </b> 2022/12/17
 * </p>
 *
 * @author pengfchen
 * @since
 **/
public class LogHelper {

    @Setter(AccessLevel.NONE)
    @Getter
    List<String> records;

    public void appendRecord(String message, Object... objects) {
        if (records == null) {
            records = new ArrayList<>();
        }
        String format = PrintTool.format(message, objects);
        records.add(format);
    }

}
